﻿@import "../../../Styles/functions.scss";
@import "../../../Styles/media-queries.scss";

.bit-dtp {
    margin: 0;
    padding: 0;
    box-shadow: none;
    font-weight: 400;
    position: relative;
    box-sizing: border-box;
    font-size: spacing(2.25);
    font-family: $tg-font-family;

    &.bit-dis {
        .bit-dtp-lbl {
            color: $clr-fg-dis;
        }

        .bit-dtp-icn {
            cursor: default;
            pointer-events: none;
            color: $clr-fg-dis;
            background: none $clr-bg-dis;
            border: $shp-border-width $shp-border-style $clr-brd-dis;
        }

        .bit-dtp-ico {
            cursor: default;
            color: $clr-fg-dis;
        }

        .bit-dtp-inp {
            cursor: default;
            color: $clr-fg-dis;
            background: none $clr-bg-dis;
        }

        .bit-dtp-pkt,
        .bit-dtp-nbt,
        .bit-dtp-wlb,
        .bit-dtp-dbt,
        .bit-dtp-pkb,
        .bit-dtp-ptb,
        .bit-dtp-tdv {
            color: $clr-fg-dis;
        }
    }

    &.bit-inv {
        .bit-dtp-icn {
            border-color: $clr-err;
        }
    }

    &.bit-rtl {
        .bit-dtp-am-pm {
            order: -1;
            direction: rtl;
        }
    }
}

.bit-dtp-lbl {
    margin: 0;
    display: block;
    box-shadow: none;
    font-weight: 600;
    box-sizing: border-box;
    padding: spacing(0.5) 0;
    font-size: spacing(1.75);
    overflow-wrap: break-word;
    color: $clr-fg-pri;
}

.bit-dtp-wrp {
    position: relative;
}

.bit-dtp-icn {
    margin: 0;
    display: flex;
    gap: spacing(1);
    cursor: pointer;
    box-shadow: none;
    height: spacing(4);
    position: relative;
    align-items: center;
    padding: 0 spacing(1);
    flex-flow: row nowrap;
    box-sizing: border-box;
    border-radius: $shp-border-radius;
    background-color: $clr-bg-pri;
    border: $shp-border-width $shp-border-style $clr-brd-pri;
}

.bit-dtp-ico {
    padding: 0;
    cursor: pointer;
    color: $clr-fg-sec;
}

.bit-dtp-clr {
    display: flex;
    width: spacing(3.75);
    height: spacing(3.75);
    justify-content: center;
    align-items: center;
    background-color: $clr-bg-sec;
    cursor: pointer;

    i {
        speak: none;
        width: unset;
        pointer-events: none;
        display: inline-block;
        font-size: spacing(1.5);
        color: $clr-fg-sec;
    }

    @media (hover: hover) {
        &:hover {
            background-color: $clr-bg-pri-hover;
        }
    }
}

.bit-dtp-inp {
    margin: 0;
    outline: 0;
    padding: 0;
    width: 100%;
    min-width: 0;
    height: 100%;
    border: none;
    cursor: pointer;
    box-shadow: none;
    font-weight: 400;
    border-radius: 0;
    box-sizing: border-box;
    text-overflow: ellipsis;
    font-size: spacing(1.75);
    background: none transparent;
    color: $clr-fg-pri;
    font-family: $tg-font-family;
}

.bit-dtp-ein {
    cursor: default;
}

.bit-dtp-lic {
    .bit-dtp-icn {
        flex-direction: row-reverse;
    }

    .bit-dtp-ico {
        padding-left: 0;
        padding-right: spacing(1);
    }
}

.bit-dtp-foc {
    .bit-dtp-icn::after {
        content: "";
        position: absolute;
        pointer-events: none;
        inset: spacing(-0.125);
        border-radius: $shp-border-radius;
        border: spacing(0.25) $shp-border-style $clr-pri;
    }
}

.bit-dtp-cal {
    display: none;
    position: fixed;
    font-weight: 400;
    outline: transparent;
    box-sizing: border-box;
    z-index: $zindex-callout;
    font-size: spacing(1.75);
    animation-fill-mode: both;
    animation-duration: 0.367s;
    font-family: $tg-font-family;
    box-shadow: $box-shadow-callout;
    border-radius: $shp-border-radius;
    animation-name: bit-fade-show, bit-slide-down;
    animation-timing-function: cubic-bezier(0.1, 0.9, 0.2, 1);
}

.bit-dtp-cac {
    height: 100%;
    outline: none;
    position: relative;
    overflow: hidden auto;
    border-radius: $shp-border-radius;
    background-color: $clr-bg-pri;
}

.bit-dtp-grp {
    margin: 0;
    padding: 0;
    height: 100%;
    display: flex;
    outline: none;
    box-shadow: none;
    box-sizing: border-box;
}

.bit-dtp-sdt {
    height: 0;
    border: 0;
    margin: 0;
    padding: 0;
    overflow: hidden;
    position: absolute;
    width: spacing(0.125);
}

.bit-dtp-dwp {
    margin: 0;
    display: flex;
    box-shadow: none;
    padding: spacing(1.5);
    min-width: spacing(26);
    box-sizing: content-box;
    flex-flow: column nowrap;
}

.bit-dtp-dgd {
    border-spacing: 0;
    position: relative;
    text-align: center;
    font-size: inherit;
    table-layout: fixed;
    margin-top: spacing(0.5);
    border-collapse: collapse;
    margin-bottom: spacing(1.25);
}

.bit-dtp-dgh,
.bit-dtp-dgr {
    width: 100%;
    display: flex;
    flex-flow: row nowrap;
    justify-content: space-evenly;
}

.bit-dtp-wlb {
    margin: 0;
    padding: 0;
    width: 100%;
    border: none;
    aspect-ratio: 1;
    font-weight: 400;
    color: $clr-fg-pri;
    position: relative;
    text-align: center;
    font-size: spacing(1.5);
    line-height: spacing(3.5);
    animation-fill-mode: both;
    animation-duration: 0.267s;
    animation-name: bit-fade-show;
    animation-timing-function: cubic-bezier(0.1, 0.25, 0.75, 0.9);
}

.bit-dtp-dbt {
    padding: 0;
    border: none;
    display: flex;
    cursor: pointer;
    overflow: visible;
    position: relative;
    width: spacing(3.5);
    align-items: center;
    height: spacing(3.5);
    outline: transparent;
    font-weight: inherit;
    box-sizing: border-box;
    font-size: spacing(1.5);
    line-height: spacing(3);
    justify-content: center;
    background-color: transparent;
    color: $clr-fg-pri;
    border-radius: $shp-border-radius;

    @media (hover: hover) {
        &:hover {
            background-color: $clr-bg-pri-hover;
        }
    }

    &:active {
        background-color: $clr-bg-pri-active;
    }

    &:disabled {
        pointer-events: none;
        background-color: transparent;
        color: $clr-fg-dis;
    }
}

.bit-dtp-dbs {
    background-color: $clr-bg-sec;

    &::after {
        inset: 0;
        content: "";
        position: absolute;
        border: $shp-border-width $shp-border-style $clr-brd-pri;
    }
}

.bit-dtp-dbo {
    font-weight: 400;
    color: $clr-fg-sec;
}

.bit-dtp-dtd {
    font-weight: 600;
    border-radius: 50%;
    color: $clr-pri-text;
    background-color: $clr-pri;

    @media(hover: hover) {
        &:hover {
            background-color: $clr-pri-hover;
        }
    }

    &:active {
        background-color: $clr-pri-active;
    }
}

.bit-dtp-wnm {
    display: flex;
    font-weight: 400;
    width: spacing(3.5);
    align-items: center;
    height: spacing(3.5);
    box-sizing: border-box;
    font-size: spacing(1.5);
    justify-content: center;
    padding: spacing(0.375) 0 0 0;
    color: $clr-fg-sec;
    background-color: $clr-bg-sec;
    border-inline-end: $shp-border-width $shp-border-style $clr-brd-sec;
}

.bit-dtp-pkh {
    width: 100%;
    position: relative;
    height: spacing(3.5);
    display: inline-flex;
    line-height: spacing(5.5);
}

.bit-dtp-tph {
    justify-content: end;
}

.bit-dtp-pkt,
.bit-dtp-ptb {
    margin: 0;
    border: none;
    flex-grow: 1;
    cursor: text;
    overflow: hidden;
    font-weight: 600;
    text-align: start;
    color: $clr-fg-pri;
    position: relative;
    white-space: nowrap;
    align-items: center;
    outline: transparent;
    display: inline-block;
    text-overflow: ellipsis;
    padding: 0 spacing(1.25);
    font-size: spacing(1.75);
    line-height: spacing(3.5);
    background-color: transparent;
    border-radius: $shp-border-radius;
}

.bit-dtp-ptb {
    cursor: pointer;

    @media (hover: hover) {
        &:hover {
            background-color: $clr-bg-pri-hover;
        }
    }

    &:disabled {
        pointer-events: none;
        background-color: transparent;

        .bit-dtp-gti,
        .bit-icon {
            color: $clr-fg-dis;
        }
    }
}

.bit-dtp-nbc {
    display: flex;
    align-items: center;
}

.bit-dtp-nbt,
.bit-dtp-gtb,
.bit-dtp-gtn {
    padding: 0;
    border: none;
    display: block;
    cursor: pointer;
    overflow: visible;
    position: relative;
    text-align: center;
    width: spacing(3.5);
    height: spacing(3.5);
    outline: transparent;
    min-width: spacing(3.5);
    font-size: spacing(1.5);
    min-height: spacing(3.5);
    line-height: spacing(3.5);
    background-color: transparent;
    color: $clr-fg-pri;
    border-radius: $shp-border-radius;

    @media (hover: hover) {
        &:hover {
            background-color: $clr-bg-pri-hover;
        }
    }

    &:active {
        background-color: $clr-bg-pri-hover;
    }

    &:disabled {
        pointer-events: none;
        background-color: transparent;

        .bit-dtp-gti,
        .bit-icon {
            color: $clr-fg-dis;
        }
    }
}

.bit-dtp-tbt {
    padding: 0;
    border: none;
    cursor: pointer;
    overflow: visible;
    position: relative;
    text-align: center;
    width: spacing(3.75);
    outline: transparent;
    line-height: spacing(3.75);
    font-size: spacing(1.5);
    background-color: transparent;
    color: $clr-fg-pri;
    border-radius: $shp-border-radius;
    aspect-ratio: 1;

    @media (hover: hover) {
        &:hover {
            background-color: $clr-bg-pri-hover;
        }
    }

    &:active {
        background-color: $clr-bg-pri-hover;
    }

    i {
        speak: none;
        width: 100%;
        display: flex;
        aspect-ratio: 1;
        align-items: center;
        justify-content: center;
    }

    &:disabled {
        color: $clr-fg-dis;
        pointer-events: none;
        background-color: transparent;

        i {
            color: $clr-fg-dis;
        }
    }
}

.bit-dtp-dvd {
    top: 0;
    border-right: $shp-border-width $shp-border-style $clr-brd-sec;
}

.bit-dtp-mwp {
    margin: 0;
    display: flex;
    overflow: hidden;
    box-shadow: none;
    padding: spacing(1.5);
    min-width: spacing(26);
    box-sizing: content-box;
    flex-flow: column nowrap;
}

.bit-dtp-pkc {
    margin-top: spacing(0.5);
    margin-bottom: spacing(1.5);
}

.bit-dtp-twp {
    margin: 0;
    display: flex;
    overflow: hidden;
    box-shadow: none;
    padding: spacing(1.5);
    box-sizing: content-box;
    flex-flow: column nowrap;
}

.bit-dtp-pkr {
    display: flex;
    margin-bottom: spacing(2);
    justify-content: space-evenly;

    &:last-child {
        margin: 0;
    }
}

.bit-dtp-pkb {
    padding: 0;
    border: none;
    cursor: pointer;
    overflow: hidden;
    width: spacing(6);
    position: relative;
    white-space: nowrap;
    outline: transparent;
    max-width: spacing(7);
    font-size: spacing(1.5);
    line-height: spacing(5);
    text-overflow: ellipsis;
    background-color: transparent;
    color: $clr-fg-pri;
    border-radius: $shp-border-radius;

    @media (hover: hover) {
        &:hover {
            background-color: $clr-bg-pri-hover;
        }
    }

    &:disabled {
        pointer-events: none;
        background-color: transparent;
        color: $clr-fg-dis;
    }
}

.bit-dtp-psm {
    font-weight: 600;
    background-color: $clr-bg-sec;

    @media (hover: hover) {
        &:hover {
            background-color: $clr-bg-pri-hover;
        }
    }
}

.bit-dtp-pcm {
    color: $clr-pri-text;
    background-color: $clr-pri;

    @media (hover: hover) {
        &:hover {
            color: $clr-sec-hover;
            background-color: $clr-pri-hover;
        }
    }
}

.bit-dtp-tic {
    margin: 0;
    flex: 0.85;
    display: flex;
    outline: none;
    direction: ltr;
    gap: spacing(1);
    box-shadow: none;
    padding: spacing(2);
    align-items: center;
    box-sizing: border-box;
    justify-content: center;
}

.bit-dtp-tpr {
    display: flex;
    gap: spacing(0.25);
    align-items: center;
    flex-direction: column;
    justify-content: space-between;
}

.bit-dtp-tdv {
    display: flex;
    align-items: center;
    font-size: spacing(2.5);
    justify-content: center;
    font-weight: $tg-font-weight;
}

.bit-dtp-am-pm {
    display: flex;
    flex-direction: column;
    padding: spacing(1.6) 0;
    justify-content: space-between;
    margin-inline-start: spacing(2);
}

.bit-dtp-tin {
    margin: 0;
    padding: 0;
    border: none;
    cursor: pointer;
    text-align: center;
    align-items: center;
    width: spacing(3.75);
    box-sizing: border-box;
    justify-content: center;
    -moz-appearance: textfield; // Firefox
    background-color: $clr-bg-pri;
    font-size: spacing(2.28);
    font-weight: $tg-font-weight;
    overflow: hidden;
    aspect-ratio: 1;

    &::-webkit-inner-spin-button, // Chrome, Safari, Edge, Opera
    &::-webkit-outer-spin-button {
        -webkit-appearance: none;
        margin: 0;
    }

    &:focus {
        border: none;
        border-bottom: $shp-border-width $shp-border-style $clr-brd-pri-active;
        outline: none;
    }

    &:disabled {
        cursor: default;
        color: $clr-fg-dis;
    }
}

.bit-dtp-bam,
.bit-dtp-bpm {
    font-size: spacing(1.8);
    font-weight: $tg-font-weight;
}

.bit-dtp-bns {
    color: $clr-pri-text;
    background-color: $clr-pri;

    &:disabled {
        background-color: $clr-bg-dis;
    }

    @media (hover: hover) {
        &:hover {
            background-color: $clr-pri-hover;
        }
    }

    &:active {
        background-color: $clr-pri-active;
    }
}

.bit-dtp-ovl {
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    position: fixed;
    z-index: $zindex-overlay;
    background-color: transparent;
}

.bit-dtp-und {
    .bit-dtp-wrp {
        width: 100%;
        display: flex;
        border-bottom: $shp-border-width $shp-border-style $clr-brd-pri;
    }

    .bit-dtp-icn {
        border: none;
        flex: 1 1 0px;
        text-align: left;
    }

    &.bit-dis {
        .bit-dtp-wrp {
            border-bottom-color: $clr-brd-dis;
        }
    }

    &.bit-dtp-foc {
        .bit-dtp-icn::after {
            border: none;
            border-radius: 0;
            border-bottom: spacing(0.25) $shp-border-style $clr-brd-pri;
        }
    }
}

.bit-dtp-nbd {
    .bit-dtp-icn {
        border: none;
    }
}

.bit-dtp-sta {
    width: fit-content;
    display: flex;
    flex-flow: column;
    align-items: flex-start;

    .bit-dtp-cal {
        display: block;
        z-index: unset;
        animation: none;
        position: relative;
    }
}

.bit-dtp-req {
    .bit-dtp-lbl::after {
        content: "*";
        color: $clr-req;
        margin-inline-start: spacing(0.625);
    }
}

.bit-dtp-res {
    @include lt-sm {
        top: 0;
        left: 0;
        opacity: 0;
        width: 100%;
        display: block;
        overflow: hidden;
        animation-name: unset;
        transform: translateY(-100%);
        box-shadow: $box-shadow-callout;
        transition: transform 200ms ease-out, opacity 100ms linear;

        .bit-dtp-dwp,
        .bit-dtp-mwp,
        .bit-dtp-twp {
            flex-grow: 1;
        }

        .bit-dtp-pkh {
            min-height: spacing(5.5);
        }

        .bit-dtp-pkc {
            height: 100%;
            display: flex;
            flex-direction: column;
            justify-content: space-around;
        }

        .bit-dtp-pkr {
            height: 100%;
        }

        .bit-dtp-nbt,
        .bit-dtp-gtb,
        .bit-dtp-gtn,
        .bit-dtp-wlb,
        .bit-dtp-dbt,
        .bit-dtp-pkb,
        .bit-dtp-wnm {
            width: 100%;
            height: 100%;
            display: flex;
            aspect-ratio: 1;
            max-width: unset;
            align-items: center;
            justify-content: center;
            font-size: spacing(1.75);
        }

        .bit-dtp-nbt,
        .bit-dtp-gtb,
        .bit-dtp-gtn {
            width: spacing(5.5);
        }

        .bit-dtp-wlb {
            //font-weight: bold;
        }

        .bit-dtp-grp {
            justify-content: center;
        }

        .bit-dtp-tdv {
            //font-size: spacing(7);
        }

        .bit-dtp-tin {
            width: 100%;
            min-width: spacing(7);
            max-width: spacing(12);
            //font-size: spacing(5);
        }

        .bit-dtp-tbt {
            width: 100%;
            min-width: spacing(7);
            max-width: spacing(12);
            //font-size: spacing(3);
        }

        .bit-dtp-bam,
        .bit-dtp-bpm {
            width: 100%;
            //font-size: spacing(4);
            margin: spacing(0.25);
        }
    }
}
